/*
 * CSS values in this file are specific and
 * designed to match the CSS on external sites,
 * such as Google and Facebook. Therefore there
 * will be exceptions to our CSS guidelines here
 * but please do not "update" this file to
 * conform.
 *
 * @blame: dmsnell
*/

.seo-search-preview__header {
	margin: 0;
	padding: 8px 0;
	background-color: $gray-light;
	border: 1px solid lighten( $gray, 30% );
	border-bottom: 0;
	font-size: 11px;
	line-height: 1;
	font-weight: bold;
	text-transform: uppercase;
	text-align: center;
	color: darken( $gray, 10% );
}

.seo-search-preview__display {
	border: 1px solid lighten( $gray, 30% );
	font-family: arial, sans-serif;
	padding: 10px 20px;
	word-wrap: break-word;
}

.seo-search-preview__title {
	color: #1a0dab; // matching Google results
	font-size: 18px;
	line-height: 1.2;
	max-width: 616px;

	&:hover {
		cursor: pointer;
		text-decoration: underline;
	}
}

.seo-search-preview__url {
	color: #006621; // matching Google results
	font-size: 14px;
	height: 17px;
	line-height: 16px;
	max-width: 616px;
}

.seo-search-preview__snippet {
	color: #545454; // matching Google results
	font-size: 13px;
	line-height: 1.4;
	max-width: 616px;
}

.meta-title-editor .segmented-control__link {
	font-size: 12px;
	line-height: 16px;
	padding: 4px 2px;

	@include breakpoint( ">660px" ) {
		font-size: 14px;
		line-height: 18px;
		padding: 8px 12px;
	}
}

.facebook-preview {
	border: 1px solid;
	border-color: #e9ebee #e9ebee #d1d1d1;
	display: flex;
	overflow-x: auto;
	max-width: 527px;
	margin: 0 auto;
	-webkit-overflow-scrolling: touch;
}

.facebook-preview__content {
	display: flex;
}

.facebook-preview__body {
	display: flex;
	flex-direction: column;
	margin: 10px 12px;
}

.facebook-preview__title {
	color: #1d2129;
	font-family: Georgia, serif;
	font-size: 18px;
	font-weight: 500;
	line-height: 22px;
	max-height: 100px;
	transition: color 0.1s ease-in-out;
}

.facebook-preview__description {
	color: #4b4f56;
	flex-grow: 1;
	font-family: helvetica, arial, sans-serif;
	font-size: 12px;
	line-height: 16px;
	overflow-y: hidden;
}

.facebook-preview__url {
	color: #90949c;
	font-family: helvetica, arial, sans-serif;
	font-size: 11px;
	line-height: 11px;
	text-transform: uppercase;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.facebook-preview__article {
	.facebook-preview__content {
		flex-direction: column;
		min-width: 100%;
	}

	.facebook-preview__image {
		max-height: 250px;
		display: flex;
		justify-content: center;
		align-items: center;
		overflow-y: hidden;

		& img {
			height: auto;
			width: 100%;
			max-width: 527px;
		}
	}

	.facebook-preview__body {
		height: auto;
		max-height: 100px;
	}

	.facebook-preview__title {
		margin-bottom: 5px;
	}

	.facebook-preview__url {
		margin-top: 9px;
	}
}

.facebook-preview__website {
	max-height: 158px;

	.facebook-preview__image {
		flex-shrink: 0;
		height: 100%;
		width: 158px;

		& img {
			display: block;
			font-size: 14px;
			height: auto;
			width: 100%;
		}
	}

	.facebook-preview__body {
		width: 100%;
	}

	.facebook-preview__title {
		margin-bottom: 5px;
		max-height: 110px;
	}

	.facebook-preview__url {
		margin-top: auto;
		margin-bottom: 5px;
	}
}

.twitter-card-preview__container {
	width: inherit;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 20px;
}

.twitter-card-preview__summary {
	width: 506px;
	height: 125px;
	margin: 0 auto;
	overflow: hidden;
	border: 1px solid #E1E8ED;
	border-radius: 0.42857em;
}

.twitter-card-preview__large_image_summary {
	width: 506px;
	height: auto;
	margin: 0 auto;
	overflow: hidden;
	border: 1px solid #E1E8ED;
	border-radius: 0.42857em;
}

.twitter-card-preview__image {
	background-size: cover;
	background-position: center;
}

.twitter-card-preview__summary
.twitter-card-preview__image {
	float: left;
	width: 125px;
	height: 125px;
}

.twitter-card-preview__large_image_summary
.twitter-card-preview__image {
	width: 506px;
	height: 254px;
	border-bottom: 1px solid #E1E8ED;
}

.twitter-card-preview__body {
	padding: .75em;
	text-decoration: none;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 14px;
	color: black;
	text-align: left;
	line-height: 1.3em;
	overflow: hidden;
}

.twitter-card-preview__summary
.twitter-card-preview__body {
	margin-left: 125px;
	border-left: 1px solid #E1E8ED;
	height: 100%;
}

.twitter-card-preview__large_image_summary
.twitter-card-preview__body {
	padding-left: 1em;
	padding-right: 1em;
}

.twitter-card-preview__title {
	max-height: 1.3em;
	white-space: nowrap;
	font-weight: bold;
	font-size: 1em;
	margin: 0 0 .15em;
	overflow: hidden;
	text-overflow: ellipsis;
}

.twitter-card-preview__description {
	margin-top: 0.32333em;
	max-height: 3.9em;
	overflow: hidden;
	text-overflow: ellipsis;
}

.twitter-card-preview__url {
	text-transform: lowercase;
	color: #8899A6;
	max-height: 1.3em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 0.32333em;
}


// Overrides a few styles from the Reader post component
.reader-preview {
	max-width: 540px;
	pointer-events: none;

	.site__content {
		padding: 16px 4px 0 16px
	}

	.reader__post-header {
		margin: 0;
	}

	.reader__post-featured-image {
		margin-top: 16px;
		left: 0;
		width: 100%;
	}

	.reader-post-byline {
		margin: 8px 0;
		padding: 0;
		font-size: 14px;

		a {
			color: $blue-medium;
		}

		.reader-post-byline__author .gravatar {
			height: 16px;
			width: 16px;
			top: 4px;
		}
	}
}

.reader-preview__text {
	padding: 0 16px 16px;
}
